import request from '@/utils/request'

enum API {
  getDetailUrl = '/goods',
  getHotUrl = '/goods/hot',
}
// 获取一级分类
export const getDetail = (id: any) =>
  request.get<any, any>(API.getDetailUrl, { params: { id } })
// 获取热榜区域
export const getHotGoodsAPI = ({ id, type, limit = 3 }) =>
  request.get<any, any>(API.getHotUrl, { params: { id, type, limit } })
